package com.nami.pchat.application.chat.convertor;

public class Message2DomainConvertor {


//    public static DispatchWrap toDomain(PrivateChatCmd cmd) {
//        if (cmd == null) {
//            return null;
//        }
//        Message source = cmd.getMessage();
//
//        DispatchWrap dispatchWrap = new DispatchWrap();
//
//        UserCO sender = new UserCO();
////        sender.setUserIp(cmd.getUserIp());
////        sender.setMqTags(cmd.getMqTags());
////        sender.setUserId(cmd.getBindingUserId());
////        sender.setAppKey(cmd.getBindingAppKey());
////        sender.setDeviceType(cmd.getDeviceType());
//        dispatchWrap.setSender(sender);
//
//        Message msgDomain = new Message();
//
//        msgDomain.setId(source.getId());
//
//        msgDomain.setClientMsgId(source.getClientMsgId());
//
//        msgDomain.setCid(source.getCid());
//        msgDomain.setSenderId(source.getSenderId());
//        msgDomain.setReceiverId(source.getReceiverId());
//        msgDomain.setType(source.getType());
//        msgDomain.setPayload(source.getPayload());
//        msgDomain.setPayloadType(source.getPayloadType());
//        msgDomain.setConversationType(source.getConversationType());
//
//        if (source.getSenderInfo() != null) {
//            MsgUser senderInfo = source.getSenderInfo();
//            if (senderInfo != null) {
//                MsgUser senderUser = new MsgUser();
//                senderUser.setAvatar(senderInfo.getAvatar());
//                senderInfo.setNick(senderInfo.getNick());
//                msgDomain.setSenderInfo(senderUser);
//            }
//        }
//
//        msgDomain.setFlow(source.getFlow());
//        if (source.getAtUserList() != null) {
//            msgDomain.setAtUserList(new ArrayList<>(source.getAtUserList()));
//        }
//        msgDomain.setCloudCustomData(source.getCloudCustomData());
//        msgDomain.setIsPeerRead(source.getIsPeerRead());
//        msgDomain.setNeedReadReceipt(source.getNeedReadReceipt());
//        msgDomain.setReadReceiptInfo(source.getReadReceiptInfo());
//        msgDomain.setRevoker(source.getRevoker());
//        msgDomain.setOfflinePushInfo(source.getOfflinePushInfo());
//        msgDomain.setCardTemplateId(source.getCardTemplateId());
//        msgDomain.setCardBody(source.getCardBody());
//        msgDomain.setIsCardMsg(source.getIsCardMsg());
//        msgDomain.setTime(source.getTime());
//        msgDomain.setSeq(source.getSeq());
//
//        dispatchWrap.setMessage(msgDomain);
//        return dispatchWrap;
//    }

}
